<%@page import="org.Help_Desk.Entity.Employee"%>
<%@page import="org.Help_Desk.Entity.Complain"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@page import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"  %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
    <% Employee emp=new Employee();
    System.out.println("here");
                        List<Complain> ls=emp.fetchComplain();
                        System.out.println(ls.get(0).getCompid());
                    session.setAttribute("ls",ls);                    %>
	
            
		<center>
			<h1>View Complain</h1>
		</center>
		<table>
			<tr>
				<th>Complain ID</th>
				<th>Complain Title</th>
				<th>Customer Name</th>
				<th>Complain Date</th>
			</tr>
                        
                        <c:forEach var="comp" items="${ls}">  
                            <form class="form-horizontal" method="post" action="employee">
                    <tr>  
                        <td>  
                            ${comp.getCompid()}
                            
                            </td>
                            <input type="hidden" name="id" value="${comp.getCompid()}">
                            <td>
                            <c:out value="${comp.getTitle()}"></c:out>  
                            </td>
                            <td>
                            <c:out value="${comp.getCustid()}"></c:out>
                            </td>
                            <td>
                            <c:out value="${comp.getStartDate()}"></c:out>
                            </td>
                            <td>
                                <input type="button" name="btn" value="ComplainID">
                            </td>
                    </tr>  
                    	</form>

                </c:forEach>  

			
		</table>
</body>
</html>